<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>点击改变图片</title>

</head>
<body>
	<button>点击改变图片</button>
	<img src="" alt="">

	<script type="text/javascript" src='jquery-1.8.3.min.js'></script>
	<script type="text/javascript">
	$('button').click(function(){

		$('img').attr('src','./meinv/'+rand(1,10)+'.jpg');

	})

	function rand(m,n)
	{
		return Math.ceil(Math.random()*(n-m+1))+m-1;
	}
	</script>
</body>
</html>